//
// Created by tan90 on 25-4-27.
//

#include <stdio.h>

/**
 * 指针加减运算
 * @return
 */
int main() {
    char *str[] = {"hello", "world"};
    printf("%s\n", str[1]);

    int a[2][3] = {
        {1, 2, 3},
        {4, 5, 6}
    };
    int (*p)[3] = a;

    printf("%p\n", p);
    printf("%p\n", p + 1);

    int p0 = 0x80;

    int p00 = p0^0;
    int p01 = p0^1;
    int p02 = p0^2;
    int p07 = p0^7;

    printf("%x\n", p00);
    printf("%x\n", p01);
    printf("%x\n", p02);
    printf("%x\n", p07);
    int bool = -1;
    printf("%d\n", ~bool);
}
